clear

use "proc_data\UCDP2021-01-07.dta" 

rename *, lower

label variable id "A unique numeric ID identifying each event : UCDP"
drop relid
*label variable relid "old ID"
label variable year "Year : UCDP"
label variable active_year "event belongs to an active conflict/dyad/actor-year =1"

label variable code_status "Always clear, only used for monthly releases of candidate events"
label define violencelabel 1 "state-based conflict" 2 "non-state conflict" 3 "one-sided violence"

label values type_of_violence violencelabel
label variable type_of_violence "Type of UCDP conflict"

drop conflict_dset_id
label variable conflict_new_id "A unique conflict identification code for each individual conflict in the dataset"

label variable conflict_name "Name of the UCDP conflict to which the event belongs, nb: can be dyad name"

drop dyad_dset_id
label variable dyad_new_id "A unique conflict identification code for each individual dyad"
label variable dyad_name "Name of the conflict dyad creating the event"

label variable side_a_new_id "A unique ID of side A"
label variable side_a "The name of Side A in the dyad. In state-based conflicts always a government. In one-sided violence always the perpetrating party"
drop side_a_dset_id side_b_dset_id

label variable side_b_new_id "A unique ID of side B"
label variable side_b "The name of Side B in the dyad. In state-based conflicts always a government. In one-sided violence always the perpetrating party"

label variable number_of_sources "Number of total sources containing information for an event that were consulted"

label variable source_article "References to the names, dates and titles of the source material from which information on the event is gathered"
label variable source_office "name of the organizations publishing the source materials"
label variable source_date "date the source materials were published"
label variable source_headline "titles of source materials"
label variable source_original "name or type of person or organization from which the information about the event originates in the original report"

label define wherelabel 1 "exact location of the event known and coded" 2 "event occurred within at maximum a ca. 25 km radius around a known coded point" 3 "only the adm2 where an event happened is known - centroid" 4 "only the adm1 where an event happened is known - centroid" 5 "only spatial reference for the event is a linear feature or a fuzzy polygon without defined borders" 6 "only the country where the event took place in is known" 7 "event in international waters or airspace"
label values where_pre wherelabel
label variable where_prec "precision with which the coordinates and location assigned to the event reflects the location of the actual event"

label variable where_coordinates "Name of the location to which the event is assigned. Fully standardized and normalized"
label variable where_description "Comment on the location coded, sometimes left empty can include area of the capital or name of a village that has not been found"
label variable adm_1 "Name of the 1st order administrative division where the event took place"
label variable adm_2 "Name of the 2nd order administrative division where the event took place"
label variable geom_wkt "location OGC WKT"
label variable priogrid_gid "PRIO-grid cell id (gid)"
label variable country "Country name"
label variable country_id "Gleditsch and Ward number of the country in which the event takes place"
label variable region "Global region where the event took place"

label define claritylabel 1 "high" 2 "lower"
label values event_clarity claritylabel
label variable event_clarity "clarity of events"

label define datelabel 1 "exact date is known" 2 "known only within a 2-6 day range" 3 "only the week of the event is known" 4 "dateis known only within an 8-30 day range or only the month when the event has taken place is known" 5 "date is known only within a range longer than one month but not more than one calendar year"
label values date_prec datelabel
label variable date_prec "How precise the information is about the date of an event"

label variable date_start "earliest possible date when the event has taken place"
label variable date_end "last possible date when the event has taken place"
label variable deaths_a "best estimate of deaths sustained by side a"
label variable deaths_b "best estimate of deaths sustained by side b"
label variable deaths_civilians "best estimate of dead civilians in the event"
label variable deaths_unknown "best estimate of deaths of persons of unknown status"
label variable best "most likely estimate of total fatalities resulting from an event : UCDP"
label variable high "highest reliable estimate of total fatalities : UCDP"
label variable low "lowest reliable estimate of total fatalities : UCDP"

label variable gwnoa "The Gleditsch and Ward number for Side A if the side is a state"
label variable gwnob "The Gleditsch and Ward number for Side B if the side is a state"

label variable objectid "nearest unique grid cell id"
drop gid_0 

save "proc_data\UCDP_loc_level.dta", replace